{% extends "base.html" %}
{% load staticfiles %}

{% block title %}
    电子产品列表
{% endblock %}

{% block css %}
    <link rel="stylesheet" href="{% static 'css/list.css' %}">
{% endblock %}

{% block bread %}
<section class="bread">
    <div class="row">
        <div class="col-lg-offset-1 col-lg-10">
            <div class="breadDiv">
                <span><a href="{% url 'index' %}">首页</a></span><span>&nbsp;>&nbsp;</span><span>二手电子产品</span>
            </div>
        </div>
    </div>
</section>
{% endblock %}

{% block content %}
<section class="content">
<div class="row">
    <div class="col-lg-10 col-lg-offset-1">
        <ul class="contentul">
            {% for eleproduct in goods_eleproducts %}
            <li class="contentli">
                <div class="col-lg-12 {% if forloop.first %} contentDiv1 {% else %} contentDiv2 {% endif %}">
                    <div>
                        <div class="contentleft">
                            <a href="{% url 'goods:eleproduct_detail' eleproduct.id %}"><img src="{{ MEDIA_URL }}{{ eleproduct.goodsimage_set.all.first.image }}"/></a>
                        </div>
                        <div class="contentright">
                            <p><a href="{% url 'goods:eleproduct_detail' eleproduct.id %}">{{ eleproduct.goods_title }}</a><span>{{ eleproduct.price }}</span></p>
                            <p>{{ eleproduct.description | slice:":30" }}.......</p>
                            <br>
                            <p>发布时间：{{ eleproduct.add_time|date:"Y-m-d" }}</p>
                        </div>
                    </div>
                </div>
            </li>
            {% endfor %}

        </ul>
    </div>
</div>
</section>
{% endblock %}